﻿namespace TopHero
{
    public class Torch : CellEntity
    {
        internal Torch(Game game, Cell cell) : base(game, cell)
        {
        }

        internal override void Start()
        {
            _viewObject = _game.viewService.CreatePrefabView(1);
            _viewObject.Link(this);
        }

        internal override bool HandleMessage(Telegram telegram)
        {
            if (telegram.msg == MessageType.HeroArriveCell)
            {
                _game.world.AddLoopNum();
                return true;
            }

            return false;
        }
    }
}